<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SimpleWindow: sw::ContextMenu类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SimpleWindow
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('classsw_1_1_context_menu.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="classsw_1_1_context_menu-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">sw::ContextMenu类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>上下文菜单  
 <a href="#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_context_menu_8h_source.html">ContextMenu.h</a>&gt;</code></p>
<div class="dynheader">
类 sw::ContextMenu 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classsw_1_1_context_menu.png" usemap="#sw::ContextMenu_map" alt=""/>
  <map id="sw::ContextMenu_map" name="sw::ContextMenu_map">
<area href="classsw_1_1_menu_base.html" title="菜单类型的基类" alt="sw::MenuBase" shape="rect" coords="0,0,107,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ac51b991e84733be50e525147c3cc9d43" id="r_ac51b991e84733be50e525147c3cc9d43"><td class="memItemLeft" align="right" valign="top"><a id="ac51b991e84733be50e525147c3cc9d43" name="ac51b991e84733be50e525147c3cc9d43"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ContextMenu</b> ()</td></tr>
<tr class="memdesc:ac51b991e84733be50e525147c3cc9d43"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化上下文菜单 <br /></td></tr>
<tr class="separator:ac51b991e84733be50e525147c3cc9d43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63c072213d8bfb7cbe4d6974eb44266b" id="r_a63c072213d8bfb7cbe4d6974eb44266b"><td class="memItemLeft" align="right" valign="top"><a id="a63c072213d8bfb7cbe4d6974eb44266b" name="a63c072213d8bfb7cbe4d6974eb44266b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ContextMenu</b> (std::initializer_list&lt; <a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &gt; <a class="el" href="classsw_1_1_dictionary.html">items</a>)</td></tr>
<tr class="memdesc:a63c072213d8bfb7cbe4d6974eb44266b"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化上下文菜单并设置菜单项 <br /></td></tr>
<tr class="separator:a63c072213d8bfb7cbe4d6974eb44266b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classsw_1_1_menu_base"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_methods_classsw_1_1_menu_base')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classsw_1_1_menu_base.html">sw::MenuBase</a></td></tr>
<tr class="memitem:a5e53085e7078b090cabf8998d6146831 inherit pub_methods_classsw_1_1_menu_base" id="r_a5e53085e7078b090cabf8998d6146831"><td class="memItemLeft" align="right" valign="top">
<a class="el" href="classsw_1_1_dictionary.html">virtual</a>&#160;</td><td class="memItemRight" valign="bottom"><b>~MenuBase</b> ()</td></tr>
<tr class="memdesc:a5e53085e7078b090cabf8998d6146831 inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">释放资源 <br /></td></tr>
<tr class="separator:a5e53085e7078b090cabf8998d6146831 inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f18755d0245d1e8c536438b5ec99093 inherit pub_methods_classsw_1_1_menu_base" id="r_a7f18755d0245d1e8c536438b5ec99093"><td class="memItemLeft" align="right" valign="top">
<a class="el" href="classsw_1_1_dictionary.html">HMENU</a>&#160;</td><td class="memItemRight" valign="bottom"><b>GetHandle</b> ()</td></tr>
<tr class="memdesc:a7f18755d0245d1e8c536438b5ec99093 inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取菜单句柄 <br /></td></tr>
<tr class="separator:a7f18755d0245d1e8c536438b5ec99093 inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5e31e8a7e3f1744fec35acfdce47b2e inherit pub_methods_classsw_1_1_menu_base" id="r_aa5e31e8a7e3f1744fec35acfdce47b2e"><td class="memItemLeft" align="right" valign="top">
<a class="el" href="classsw_1_1_dictionary.html">void</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Update</b> ()</td></tr>
<tr class="memdesc:aa5e31e8a7e3f1744fec35acfdce47b2e inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">更新菜单，该操作会导致菜单项的Enabled、Checked等恢复到初始状态 <br /></td></tr>
<tr class="separator:aa5e31e8a7e3f1744fec35acfdce47b2e inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1aec7eb5fee274eed8a9a49179383a94 inherit pub_methods_classsw_1_1_menu_base" id="r_a1aec7eb5fee274eed8a9a49179383a94"><td class="memItemLeft" align="right" valign="top">
<a class="el" href="classsw_1_1_dictionary.html">void</a>&#160;</td><td class="memItemRight" valign="bottom"><b>SetItems</b> (std::initializer_list&lt; <a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &gt; <a class="el" href="classsw_1_1_dictionary.html">items</a>)</td></tr>
<tr class="memdesc:a1aec7eb5fee274eed8a9a49179383a94 inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化菜单并添加菜单项 <br /></td></tr>
<tr class="separator:a1aec7eb5fee274eed8a9a49179383a94 inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f4d2832b6bcc759e291a99278b3eb12 inherit pub_methods_classsw_1_1_menu_base" id="r_a2f4d2832b6bcc759e291a99278b3eb12"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_menu_base.html#a2f4d2832b6bcc759e291a99278b3eb12">SetSubItems</a> (<a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">item</a>, std::initializer_list&lt; <a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &gt; subItems)</td></tr>
<tr class="memdesc:a2f4d2832b6bcc759e291a99278b3eb12 inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">重新设置当前菜单中某个菜单项的子项  <br /></td></tr>
<tr class="separator:a2f4d2832b6bcc759e291a99278b3eb12 inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a300bc76b5be03814cb8fa534a3a74cfe inherit pub_methods_classsw_1_1_menu_base" id="r_a300bc76b5be03814cb8fa534a3a74cfe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">void</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_menu_base.html#a300bc76b5be03814cb8fa534a3a74cfe">AddItem</a> (<a class="el" href="classsw_1_1_dictionary.html">const</a> <a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">item</a>)</td></tr>
<tr class="memdesc:a300bc76b5be03814cb8fa534a3a74cfe inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">添加新的菜单项到菜单  <br /></td></tr>
<tr class="separator:a300bc76b5be03814cb8fa534a3a74cfe inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa48a89a167974e8a7397ffe6058c475f inherit pub_methods_classsw_1_1_menu_base" id="r_aa48a89a167974e8a7397ffe6058c475f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_menu_base.html#aa48a89a167974e8a7397ffe6058c475f">AddSubItem</a> (<a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">item</a>, <a class="el" href="classsw_1_1_dictionary.html">const</a> <a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">subItem</a>)</td></tr>
<tr class="memdesc:aa48a89a167974e8a7397ffe6058c475f inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">像当前菜单中的某个菜单项添加新的子项  <br /></td></tr>
<tr class="separator:aa48a89a167974e8a7397ffe6058c475f inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75c96dd59694d38a9ea59e3973cd5bea inherit pub_methods_classsw_1_1_menu_base" id="r_a75c96dd59694d38a9ea59e3973cd5bea"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_menu_base.html#a75c96dd59694d38a9ea59e3973cd5bea">RemoveItem</a> (<a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">item</a>)</td></tr>
<tr class="memdesc:a75c96dd59694d38a9ea59e3973cd5bea inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">移除当前菜单中的某个子项  <br /></td></tr>
<tr class="separator:a75c96dd59694d38a9ea59e3973cd5bea inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47fe9d419c9c50459389c46b410849d8 inherit pub_methods_classsw_1_1_menu_base" id="r_a47fe9d419c9c50459389c46b410849d8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_menu_base.html#a47fe9d419c9c50459389c46b410849d8">GetMenuItem</a> (<a class="el" href="classsw_1_1_dictionary.html">int</a> id)</td></tr>
<tr class="memdesc:a47fe9d419c9c50459389c46b410849d8 inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">通过id获取菜单项  <br /></td></tr>
<tr class="separator:a47fe9d419c9c50459389c46b410849d8 inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a207341719edb495ca22be7090b3a8b37 inherit pub_methods_classsw_1_1_menu_base" id="r_a207341719edb495ca22be7090b3a8b37"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_menu_base.html#a207341719edb495ca22be7090b3a8b37">GetMenuItem</a> (std::initializer_list&lt; <a class="el" href="classsw_1_1_dictionary.html">int</a> &gt; <a class="el" href="classsw_1_1_dictionary.html">path</a>)</td></tr>
<tr class="memdesc:a207341719edb495ca22be7090b3a8b37 inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">通过索引来获取菜单项  <br /></td></tr>
<tr class="separator:a207341719edb495ca22be7090b3a8b37 inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09259eb19e71878bd77f4d3dece7fed8 inherit pub_methods_classsw_1_1_menu_base" id="r_a09259eb19e71878bd77f4d3dece7fed8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_menu_base.html#a09259eb19e71878bd77f4d3dece7fed8">GetMenuItem</a> (std::initializer_list&lt; std::wstring &gt; <a class="el" href="classsw_1_1_dictionary.html">path</a>)</td></tr>
<tr class="memdesc:a09259eb19e71878bd77f4d3dece7fed8 inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">通过菜单项的text来获取菜单项  <br /></td></tr>
<tr class="separator:a09259eb19e71878bd77f4d3dece7fed8 inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1df38ffd7053c561bc746e5830672295 inherit pub_methods_classsw_1_1_menu_base" id="r_a1df38ffd7053c561bc746e5830672295"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_menu_base.html#a1df38ffd7053c561bc746e5830672295">GetMenuItemByTag</a> (<a class="el" href="classsw_1_1_dictionary.html">uint64_t</a> tag)</td></tr>
<tr class="memdesc:a1df38ffd7053c561bc746e5830672295 inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">通过tag值获取菜单项  <br /></td></tr>
<tr class="separator:a1df38ffd7053c561bc746e5830672295 inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1cb75444ab44b6b4dc3599634b30b07e inherit pub_methods_classsw_1_1_menu_base" id="r_a1cb75444ab44b6b4dc3599634b30b07e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_menu_base.html#a1cb75444ab44b6b4dc3599634b30b07e">GetParent</a> (<a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">item</a>)</td></tr>
<tr class="memdesc:a1cb75444ab44b6b4dc3599634b30b07e inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取当前菜单中指定菜单项的直接父菜单项  <br /></td></tr>
<tr class="separator:a1cb75444ab44b6b4dc3599634b30b07e inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab610a8a98e4bf6f199fe7706dbb57f4d inherit pub_methods_classsw_1_1_menu_base" id="r_ab610a8a98e4bf6f199fe7706dbb57f4d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_menu_base.html#ab610a8a98e4bf6f199fe7706dbb57f4d">GetEnabled</a> (<a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">item</a>, <a class="el" href="classsw_1_1_dictionary.html">bool</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">out</a>)</td></tr>
<tr class="memdesc:ab610a8a98e4bf6f199fe7706dbb57f4d inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取一个值，表示菜单项是否可用  <br /></td></tr>
<tr class="separator:ab610a8a98e4bf6f199fe7706dbb57f4d inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a537663148790e0516c1a2aca7b02afd1 inherit pub_methods_classsw_1_1_menu_base" id="r_a537663148790e0516c1a2aca7b02afd1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_menu_base.html#a537663148790e0516c1a2aca7b02afd1">SetEnabled</a> (<a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">item</a>, <a class="el" href="classsw_1_1_dictionary.html">bool</a> <a class="el" href="classsw_1_1_dictionary.html">value</a>)</td></tr>
<tr class="memdesc:a537663148790e0516c1a2aca7b02afd1 inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置菜单项是否可用  <br /></td></tr>
<tr class="separator:a537663148790e0516c1a2aca7b02afd1 inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a631549b5be6a41f8a24342a880826d inherit pub_methods_classsw_1_1_menu_base" id="r_a2a631549b5be6a41f8a24342a880826d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_menu_base.html#a2a631549b5be6a41f8a24342a880826d">GetChecked</a> (<a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">item</a>, <a class="el" href="classsw_1_1_dictionary.html">bool</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">out</a>)</td></tr>
<tr class="memdesc:a2a631549b5be6a41f8a24342a880826d inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取一个值，表示菜单项是否选中  <br /></td></tr>
<tr class="separator:a2a631549b5be6a41f8a24342a880826d inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a114b4fe9eb2cd543c605479198d67517 inherit pub_methods_classsw_1_1_menu_base" id="r_a114b4fe9eb2cd543c605479198d67517"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_menu_base.html#a114b4fe9eb2cd543c605479198d67517">SetChecked</a> (<a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">item</a>, <a class="el" href="classsw_1_1_dictionary.html">bool</a> <a class="el" href="classsw_1_1_dictionary.html">value</a>)</td></tr>
<tr class="memdesc:a114b4fe9eb2cd543c605479198d67517 inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置菜单项是否选中  <br /></td></tr>
<tr class="separator:a114b4fe9eb2cd543c605479198d67517 inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f9fb3eda715d2c71e3e4a1b0562bac8 inherit pub_methods_classsw_1_1_menu_base" id="r_a9f9fb3eda715d2c71e3e4a1b0562bac8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_menu_base.html#a9f9fb3eda715d2c71e3e4a1b0562bac8">SetText</a> (<a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">item</a>, <a class="el" href="classsw_1_1_dictionary.html">const</a> std::wstring &amp;<a class="el" href="classsw_1_1_dictionary.html">value</a>)</td></tr>
<tr class="memdesc:a9f9fb3eda715d2c71e3e4a1b0562bac8 inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置菜单项文本  <br /></td></tr>
<tr class="separator:a9f9fb3eda715d2c71e3e4a1b0562bac8 inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9660cec7666003c520171dc44e85c13 inherit pub_methods_classsw_1_1_menu_base" id="r_ad9660cec7666003c520171dc44e85c13"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_menu_base.html#ad9660cec7666003c520171dc44e85c13">SetBitmap</a> (<a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">item</a>, <a class="el" href="classsw_1_1_dictionary.html">HBITMAP</a> <a class="el" href="classsw_1_1_dictionary.html">hBitmap</a>)</td></tr>
<tr class="memdesc:ad9660cec7666003c520171dc44e85c13 inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置菜单项要显示的位图  <br /></td></tr>
<tr class="separator:ad9660cec7666003c520171dc44e85c13 inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7795d9c4dd7dca16341249fab6f9cfb9 inherit pub_methods_classsw_1_1_menu_base" id="r_a7795d9c4dd7dca16341249fab6f9cfb9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsw_1_1_menu_base.html#a7795d9c4dd7dca16341249fab6f9cfb9">SetCheckBitmap</a> (<a class="el" href="classsw_1_1_menu_item.html">MenuItem</a> &amp;<a class="el" href="classsw_1_1_dictionary.html">item</a>, <a class="el" href="classsw_1_1_dictionary.html">HBITMAP</a> <a class="el" href="classsw_1_1_dictionary.html">hBmpUnchecked</a>, <a class="el" href="classsw_1_1_dictionary.html">HBITMAP</a> <a class="el" href="classsw_1_1_dictionary.html">hBmpChecked</a>)</td></tr>
<tr class="memdesc:a7795d9c4dd7dca16341249fab6f9cfb9 inherit pub_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置菜单不同选中状态下显示的位图  <br /></td></tr>
<tr class="separator:a7795d9c4dd7dca16341249fab6f9cfb9 inherit pub_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a968f4539826715feb35237acb1ec02b3" id="r_a968f4539826715feb35237acb1ec02b3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">static</a> <a class="el" href="classsw_1_1_dictionary.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a968f4539826715feb35237acb1ec02b3">IsContextMenuID</a> (<a class="el" href="classsw_1_1_dictionary.html">int</a> id)</td></tr>
<tr class="memdesc:a968f4539826715feb35237acb1ec02b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">判断ID是否为上下文菜单项的ID  <br /></td></tr>
<tr class="separator:a968f4539826715feb35237acb1ec02b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-methods" name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:ae27616f20c9f03d7e5b81eaa6e7f3446" id="r_ae27616f20c9f03d7e5b81eaa6e7f3446"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_dictionary.html">int</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae27616f20c9f03d7e5b81eaa6e7f3446">IndexToID</a> (<a class="el" href="classsw_1_1_dictionary.html">int</a> index) <a class="el" href="classsw_1_1_dictionary.html">override</a></td></tr>
<tr class="memdesc:ae27616f20c9f03d7e5b81eaa6e7f3446"><td class="mdescLeft">&#160;</td><td class="mdescRight">根据索引获取ID  <br /></td></tr>
<tr class="separator:ae27616f20c9f03d7e5b81eaa6e7f3446"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93eb69c1dbf74969dd90d5c7a7532ce8" id="r_a93eb69c1dbf74969dd90d5c7a7532ce8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_dictionary.html">int</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a93eb69c1dbf74969dd90d5c7a7532ce8">IDToIndex</a> (<a class="el" href="classsw_1_1_dictionary.html">int</a> id) <a class="el" href="classsw_1_1_dictionary.html">override</a></td></tr>
<tr class="memdesc:a93eb69c1dbf74969dd90d5c7a7532ce8"><td class="mdescLeft">&#160;</td><td class="mdescRight">根据ID获取索引  <br /></td></tr>
<tr class="separator:a93eb69c1dbf74969dd90d5c7a7532ce8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_classsw_1_1_menu_base"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pro_methods_classsw_1_1_menu_base')"><img src="closed.png" alt="-"/>&#160;Protected 成员函数 继承自 <a class="el" href="classsw_1_1_menu_base.html">sw::MenuBase</a></td></tr>
<tr class="memitem:ad43a6100a635a765a80d603d7226d978 inherit pro_methods_classsw_1_1_menu_base" id="r_ad43a6100a635a765a80d603d7226d978"><td class="memItemLeft" align="right" valign="top">
&#160;</td><td class="memItemRight" valign="bottom"><b>MenuBase</b> (<a class="el" href="classsw_1_1_dictionary.html">HMENU</a> <a class="el" href="classsw_1_1_dictionary.html">hMenu</a>)</td></tr>
<tr class="memdesc:ad43a6100a635a765a80d603d7226d978 inherit pro_methods_classsw_1_1_menu_base"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化菜单 <br /></td></tr>
<tr class="separator:ad43a6100a635a765a80d603d7226d978 inherit pro_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff23b997e17db4466a522f35b7eb8d3d inherit pro_methods_classsw_1_1_menu_base" id="r_aff23b997e17db4466a522f35b7eb8d3d"><td class="memItemLeft" align="right" valign="top">
&#160;</td><td class="memItemRight" valign="bottom"><b>MenuBase</b> (<a class="el" href="classsw_1_1_dictionary.html">const</a> <a class="el" href="classsw_1_1_menu_base.html">MenuBase</a> &amp;)=<a class="el" href="classsw_1_1_dictionary.html">delete</a></td></tr>
<tr class="separator:aff23b997e17db4466a522f35b7eb8d3d inherit pro_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53edd27d8cb78d9d634950b918274342 inherit pro_methods_classsw_1_1_menu_base" id="r_a53edd27d8cb78d9d634950b918274342"><td class="memItemLeft" align="right" valign="top">
&#160;</td><td class="memItemRight" valign="bottom"><b>MenuBase</b> (<a class="el" href="classsw_1_1_menu_base.html">MenuBase</a> &amp;&amp;)=<a class="el" href="classsw_1_1_dictionary.html">delete</a></td></tr>
<tr class="separator:a53edd27d8cb78d9d634950b918274342 inherit pro_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e3b135522d2dcb33edc127ce6e8d386 inherit pro_methods_classsw_1_1_menu_base" id="r_a0e3b135522d2dcb33edc127ce6e8d386"><td class="memItemLeft" align="right" valign="top">
<a class="el" href="classsw_1_1_menu_base.html">MenuBase</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (<a class="el" href="classsw_1_1_dictionary.html">const</a> <a class="el" href="classsw_1_1_menu_base.html">MenuBase</a> &amp;)=<a class="el" href="classsw_1_1_dictionary.html">delete</a></td></tr>
<tr class="separator:a0e3b135522d2dcb33edc127ce6e8d386 inherit pro_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6c7d6241cddfea3380ff3669a2ac261 inherit pro_methods_classsw_1_1_menu_base" id="r_ad6c7d6241cddfea3380ff3669a2ac261"><td class="memItemLeft" align="right" valign="top">
<a class="el" href="classsw_1_1_menu_base.html">MenuBase</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (<a class="el" href="classsw_1_1_menu_base.html">MenuBase</a> &amp;&amp;)=<a class="el" href="classsw_1_1_dictionary.html">delete</a></td></tr>
<tr class="separator:ad6c7d6241cddfea3380ff3669a2ac261 inherit pro_methods_classsw_1_1_menu_base"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>上下文菜单 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a93eb69c1dbf74969dd90d5c7a7532ce8" name="a93eb69c1dbf74969dd90d5c7a7532ce8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93eb69c1dbf74969dd90d5c7a7532ce8">&#9670;&#160;</a></span>IDToIndex()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_dictionary.html">int</a> sw::ContextMenu::IDToIndex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">int</a></td>          <td class="paramname"><span class="paramname"><em>id</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>根据ID获取索引 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>菜单项的ID </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>索引 </dd></dl>

<p>实现了 <a class="el" href="classsw_1_1_menu_base.html#a84c15b6a20df581e6aed4b9df9e84f9a">sw::MenuBase</a>.</p>

</div>
</div>
<a id="ae27616f20c9f03d7e5b81eaa6e7f3446" name="ae27616f20c9f03d7e5b81eaa6e7f3446"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae27616f20c9f03d7e5b81eaa6e7f3446">&#9670;&#160;</a></span>IndexToID()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsw_1_1_dictionary.html">virtual</a> <a class="el" href="classsw_1_1_dictionary.html">int</a> sw::ContextMenu::IndexToID </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">int</a></td>          <td class="paramname"><span class="paramname"><em>index</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>根据索引获取ID </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>索引 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>菜单项的ID </dd></dl>

<p>实现了 <a class="el" href="classsw_1_1_menu_base.html#a9f94aca19decada231feeed33ab19743">sw::MenuBase</a>.</p>

</div>
</div>
<a id="a968f4539826715feb35237acb1ec02b3" name="a968f4539826715feb35237acb1ec02b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a968f4539826715feb35237acb1ec02b3">&#9670;&#160;</a></span>IsContextMenuID()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classsw_1_1_dictionary.html">static</a> <a class="el" href="classsw_1_1_dictionary.html">bool</a> sw::ContextMenu::IsContextMenuID </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsw_1_1_dictionary.html">int</a></td>          <td class="paramname"><span class="paramname"><em>id</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>判断ID是否为上下文菜单项的ID </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>要判断的ID </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>ID是否为上下文菜单项的ID </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li><a class="el" href="_context_menu_8h_source.html">ContextMenu.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>sw</b></li><li class="navelem"><a class="el" href="classsw_1_1_context_menu.html">ContextMenu</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0 </li>
  </ul>
</div>
</body>
</html>
